// 组织架构相关接口
import http from '@/utils/request'
// 获取部门列表的接口
export const reqGetDepartments = () => {
  return http({
    method: 'get',
    url: '/company/department'
  })
}
// // 删除部门的接口
// export const reqDelDEpartment = (id) => {
//   return http({
//     method: 'delete',
//     url: `/company/department/${id}`
//   })
// }
// 简写
// 删除部门的接口
export const reqDelDEpartment = id => http({ method: 'delete', url: `/company/department/${id}` })
// 获取部门负责人列表
export const reqGetSimpleList = () => http({ method: 'get', url: '/sys/user/simple' })
// 新增部门的接口
export const reqAddDept = data => http({ method: 'post', url: '/company/department', data })
// 根据id获取部门详情
export const reqGetDeptInfoById = id => http({ method: 'get', url: `/company/department/${id}` })
// 更新部门详情
export const reqUpDateDeptInfo = data => http({ method: 'put', url: `/company/department/${data.id}`, data })

